﻿using System.Collections.Generic;

namespace Leek.Persistence
{
    public interface IDomainObjectRepository<T, TId>
        where T : DomainObject<T, TId>
    {
        void Add(T instance);

        void Update(T instance);

        void Delete(T instance);

        IReadOnlyCollection<T> Load(DomainContext context, FilterExpression filter, int? take = null);
    }
}
